export const optionParent = {
  height: 'calc(100vh - 360px)',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  searchMenuSpan: 10,
  border: true,
  index: true,
  indexLabel: '序号',
  selection: true,
  viewBtn: false,
  editBtn: false,
  delBtn: false,
  menuWidth: 250,
  dialogWidth: 880,
  dialogClickModal: false,
  columnBtn: false,
  column: [
    {
      label: '业务模块',
      prop: 'belongModule',
      order: 1,
      span: 24,
      type: 'select',
      multiple: true,
      dicData: [
        { label: '系统', value: 'SYS' },
        { label: '仓库', value: 'WH' },
        { label: '生产', value: 'MFG' },
        { label: '品质', value: 'QMS' },
        { label: '设备', value: 'EMS' },
        { label: '报表', value: 'KPI' },
        { label: '排程', value: 'APS' }
      ],
      rules: [
        {
          required: true,
          message: '请选择业务模块',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '所属页面',
      prop: 'belongPage',
      order: 2,
      span: 24,
      rules: [
        {
          required: true,
          message: '请选择所属页面',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '字典编号',
      prop: 'code',
      order: 3,
      search: true,
      slot: true,
      span: 24,
      rules: [
        {
          required: true,
          message: '请输入字典编号',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '字典名称',
      prop: 'dictValue',
      order: 4,
      search: true,
      align: 'center',
      rules: [
        {
          required: true,
          message: '请输入字典名称',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '字典说明',
      prop: 'remark',
      order: 7,
      rules: [
        {
          required: true,
          message: '请输入字典说明',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '字典排序',
      prop: 'sort',
      order: 5,
      type: 'number',
      align: 'right',
      width: 100,
      rules: [
        {
          required: true,
          message: '请输入字典排序',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '封存',
      prop: 'isSealed',
      order: 6,
      type: 'switch',
      align: 'center',
      width: 100,
      dicData: [
        {
          label: '否',
          value: 0
        },
        {
          label: '是',
          value: 1
        }
      ],
      value: 0,
      slot: true,
      rules: [
        {
          required: true,
          message: '请选择封存',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '操作说明',
      prop: 'operationReason',
      hide: true,
      span: 24,
      type: 'textarea',
      maxRows: 3,
      minRows: 3,
      rules: [
        {
          required: true,
          message: '请输入操作说明',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '创建人',
      prop: 'remark',
      display: false
    },
    {
      label: '更新人',
      prop: 'remark',
      display: false
    },
    {
      label: '更新时间',
      prop: 'remark',
      display: false
    }
  ]
};

export const optionChild = {
  height: 'auto',
  calcHeight: 95,
  tip: false,
  searchShow: true,
  searchMenuSpan: 10,
  tree: true,
  border: true,
  index: true,
  selection: true,
  viewBtn: true,
  menuWidth: 300,
  dialogWidth: 880,
  dialogClickModal: false,
  column: [
    {
      label: '字典编号',
      prop: 'code',
      addDisabled: true,
      editDisabled: true,
      search: true,
      span: 24,
      rules: [
        {
          required: true,
          message: '请输入字典编号',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '字典名称',
      prop: 'dictValue',
      search: true,
      align: 'center',
      rules: [
        {
          required: true,
          message: '请输入字典名称',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '上级字典',
      prop: 'parentId',
      type: 'tree',
      dicData: [],
      hide: true,
      props: {
        label: 'title'
      },
      addDisabled: true,
      editDisabled: true,
      rules: [
        {
          required: false,
          message: '请选择上级字典',
          trigger: 'click'
        }
      ]
    },
    {
      label: '字典键值',
      prop: 'dictKey',
      width: 80,
      rules: [
        {
          required: true,
          message: '请输入字典键值',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '字典排序',
      prop: 'sort',
      type: 'number',
      align: 'right',
      hide: true,
      rules: [
        {
          required: true,
          message: '请输入字典排序',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '封存',
      prop: 'isSealed',
      type: 'switch',
      align: 'center',
      width: 80,
      dicData: [
        {
          label: '否',
          value: 0
        },
        {
          label: '是',
          value: 1
        }
      ],
      value: 0,
      slot: true,
      rules: [
        {
          required: true,
          message: '请选择封存',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '字典说明',
      prop: 'remark',
      hide: true
    },
    {
      label: '操作说明',
      prop: 'operationReason',
      hide: true,
      span: 24,
      type: 'textarea',
      maxRows: 3,
      minRows: 3,
      rules: [
        {
          required: true,
          message: '请输入操作说明',
          trigger: 'blur'
        }
      ]
    }
  ]
};

export const detailOption = {
  height: 300,
  calcHeight: 30,
  tree: true,
  border: true,
  index: true,
  selection: false,
  addBtn: false,
  menu: false,
  column: [
    {
      label: '字典编号',
      prop: 'code'
    },
    {
      label: '字典名称',
      prop: 'dictValue'
    },
    {
      label: '字典说明',
      prop: 'remark'
    },
    {
      label: '字典排序',
      prop: 'sort'
    },
    {
      label: '封存',
      prop: 'isSealed',
      type: 'switch',
      dicData: [
        {
          label: '否',
          value: 0
        },
        {
          label: '是',
          value: 1
        }
      ]
    }
  ]
};

export const logOption = {
  height: 300,
  calcHeight: 30,
  tree: true,
  border: true,
  index: true,
  selection: false,
  addBtn: false,
  menu: false,
  column: [
    {
      label: '修改页面',
      prop: 'operationContent'
    },
    {
      label: '编辑人',
      prop: 'createName'
    },
    {
      label: '修改时间',
      prop: 'createTime'
    },
    {
      label: '修改原因',
      prop: 'operationReason'
    }
  ]
};
